<?php
/* @var $this HyBSysProductsController */
/* @var $model HyBSysProducts */
/* @var $form CActiveForm */
?>

<div class="form">

<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'hy-bsys-products-form',
	'enableAjaxValidation'=>true,
    'htmlOptions'=>array('enctype'=>'multipart/form-data')
)); ?>

	<p class="note">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	<div class="row">
		<?php echo $form->labelEx($model,'CateID'); ?>
		<?php echo CHtml::activeDropDownList($model, 'CateID',
		$cateidarr,
		 array("class"=>"selectstyle",'options'=>array('2'=>array('selected'=>'selected'))
     )
      );
  ?>
		
		<?php echo $form->error($model,'CateID'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'BrandID'); ?>
		<?php echo $form->textField($model,'BrandID',array('size'=>30,'maxlength'=>30)); ?>
		<?php echo $form->error($model,'BrandID'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'ProductName'); ?>
		<?php echo $form->textField($model,'ProductName',array('size'=>60,'maxlength'=>70)); ?>
		<?php echo $form->error($model,'ProductName'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'SubName'); ?>
		<?php echo $form->textField($model,'SubName',array('size'=>60,'maxlength'=>100)); ?>
		<?php echo $form->error($model,'SubName'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Price'); ?>
		<?php echo $form->textField($model,'Price',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'Price'); ?>
	</div>

	<!--<div class="row">
		<?php echo $form->labelEx($model,'Postage'); ?>
		<?php echo $form->textField($model,'Postage',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'Postage'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Express'); ?>
		<?php echo $form->textField($model,'Express',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'Express'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Ems'); ?>
		<?php echo $form->textField($model,'Ems',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'Ems'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Unit'); ?>
		<?php echo $form->textField($model,'Unit',array('size'=>10,'maxlength'=>10)); ?>
		<?php echo $form->error($model,'Unit'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Material'); ?>
		<?php echo $form->textField($model,'Material',array('size'=>60,'maxlength'=>80)); ?>
		<?php echo $form->error($model,'Material'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Size'); ?>
		<?php echo $form->textField($model,'Size',array('size'=>60,'maxlength'=>80)); ?>
		<?php echo $form->error($model,'Size'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Color'); ?>
		<?php echo $form->textField($model,'Color',array('size'=>50,'maxlength'=>50)); ?>
		<?php echo $form->error($model,'Color'); ?>
	</div>

	--><div class="row">
		<?php echo $form->labelEx($model,'FirstPhoto'); ?>
		<?php // echo $form->textField($model,'FirstPhoto',array('size'=>20,'maxlength'=>20)); ?>
		<?php echo CHtml::activeFileField($model,'FirstPhoto'); ?>
		 
  <?php echo '<img src="uploadfile/product_b/'.$model->FirstPhoto.'"    width="20%"/>'; ?>
        <?php if(!$model->isNewRecord){?>
        <input type="hidden" name="FirstPhoto" id="hiddenField"    value="<?php echo $model->FirstPhoto;?>"/>
        <?php }?>
		
		<?php echo $form->error($model,'FirstPhoto'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Photos'); ?>
		<?php // echo $form->textField($model,'Photos',array('size'=>60,'maxlength'=>210)); ?>
		<?php echo CHtml::activeFileField($model,'Photos'); ?>
		<?php echo '<img src="uploadfile/product_b/'.$model->Photos.'"  width="20%"/>'; ?>
        <?php if(!$model->isNewRecord){?>
        <input type="hidden" name="Photos" id="hiddenField"    value="<?php echo $model->Photos;?>"/>
        <?php }?>
		
		<?php echo $form->error($model,'Photos'); ?>
	</div><!--

	<div class="row">
		<?php echo $form->labelEx($model,'Files'); ?>
		<?php echo $form->textField($model,'Files',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'Files'); ?>
	</div>

	--><div class="row">
		<?php echo $form->labelEx($model,'Note'); ?>
		<?php echo $form->textArea($model,'Note',array('rows'=>6, 'cols'=>50)); ?>
		<?php echo $form->error($model,'Note'); ?>
	</div>

	<!--<div class="row">
		<?php echo $form->labelEx($model,'Tag'); ?>
		<?php echo $form->textField($model,'Tag'); ?>
		<?php echo $form->error($model,'Tag'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'RelationID'); ?>
		<?php echo $form->textField($model,'RelationID',array('size'=>60,'maxlength'=>70)); ?>
		<?php echo $form->error($model,'RelationID'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'PublishDate'); ?>
		<?php echo $form->textField($model,'PublishDate'); ?>
		<?php echo $form->error($model,'PublishDate'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'ModifiedDate'); ?>
		<?php echo $form->textField($model,'ModifiedDate'); ?>
		<?php echo $form->error($model,'ModifiedDate'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'ValidDate'); ?>
		<?php echo $form->textField($model,'ValidDate'); ?>
		<?php echo $form->error($model,'ValidDate'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'SortNum'); ?>
		<?php echo $form->textField($model,'SortNum'); ?>
		<?php echo $form->error($model,'SortNum'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Lang'); ?>
		<?php echo $form->textField($model,'Lang',array('size'=>4,'maxlength'=>4)); ?>
		<?php echo $form->error($model,'Lang'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'TopNum'); ?>
		<?php echo $form->textField($model,'TopNum'); ?>
		<?php echo $form->error($model,'TopNum'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'ExtractNum'); ?>
		<?php echo $form->textField($model,'ExtractNum'); ?>
		<?php echo $form->error($model,'ExtractNum'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'IsLock'); ?>
		<?php echo $form->textField($model,'IsLock'); ?>
		<?php echo $form->error($model,'IsLock'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Clicks'); ?>
		<?php echo $form->textField($model,'Clicks'); ?>
		<?php echo $form->error($model,'Clicks'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'CreationUserID'); ?>
		<?php echo $form->textField($model,'CreationUserID'); ?>
		<?php echo $form->error($model,'CreationUserID'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'ModifiedUserID'); ?>
		<?php echo $form->textField($model,'ModifiedUserID'); ?>
		<?php echo $form->error($model,'ModifiedUserID'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'active'); ?>
		<?php echo $form->textField($model,'active'); ?>
		<?php echo $form->error($model,'active'); ?>
	</div>

	<div class="row">
		<?php echo $form->labelEx($model,'Photos1'); ?>
		<?php echo $form->textField($model,'Photos1',array('size'=>60,'maxlength'=>255)); ?>
		<?php echo $form->error($model,'Photos1'); ?>
	</div>

	--><div class="row buttons">
		<?php echo CHtml::submitButton($model->isNewRecord ? '新建' : '保存'); ?>
	</div>

<?php $this->endWidget(); ?>

</div><!-- form -->